<template>
  <basic-info-form v-model="form.project" :editable="true" @change="dateChange"></basic-info-form>
  <div style="height: 190px"></div>
  <el-row justify="center">
    <el-button type="primary" @click="next">下一步</el-button>
    <el-button @click="$emit('back')">返回</el-button>
  </el-row>
</template>

<script>
import BasicInfoForm from "@/components/BasicInfoForm";

export default {
  name: "first",
  props: ['modelValue'],
  emits:['next','back','update:modelValue'],
  components:{BasicInfoForm},
  data(){
    return{

    }
  },
  computed:{
    form:{
      get() {
        return this.modelValue
      },
      set(value) {
        this.$emit('update:modelValue', value)
      }
    }
  },
  methods:{
    dateChange(){
      console.log("dateChange")
      this.form.dates = this.getDates(this.form.project.startDate,this.form.project.endDate);
    },
    next(){
      this.dateChange();
      this.$emit('next')
    }
  }
}
</script>

<style scoped>

</style>